Skip to content

perf(cache): fix slice capacity under-allocation in SetUserOnline#3746

Merged
withchao merged 1 commit into
openimsdk:mainfrom
buvidk1234:fix/online-status
Jun 26, 2026
Merged

perf(cache): fix slice capacity under-allocation in SetUserOnline#3746
withchao merged 1 commit into
openimsdk:mainfrom
buvidk1234:fix/online-status

Conversation

@buvidk1234

Copy link
Copy Markdown
Contributor

The argv slice was initialized with a capacity of 2, but 4 metadata
parameters were immediately appended. This caused an unnecessary
reallocation on every status update.

Corrected the initial capacity to 4 to avoid extra memory allocation
in the high-concurrency online status sync path.

@pull-request-size pull-request-size Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 17, 2026
@withchao withchao enabled auto-merge June 26, 2026 07:04
@withchao withchao added this pull request to the merge queue Jun 26, 2026
Merged via the queue into openimsdk:main with commit 30074d1 Jun 26, 2026
7 of 8 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants